<script type="text/javascript">
	var x =1,y = z = 0;
	function add(n){
		return n = n + 1;
	}
	y = add(x);

	function add(n){
		return n = n + 3;
	}

	z = add(x);

	console.log(y,z)
</script> 

<script type="text/javascript">
	function foo(x){
		console.log(arguments);
		return x;
	}
	foo(1,2,3,4,5)

	function foo(x){
		console.log(arguments);
		return x;
	}(1,2,3,4,5)

	
</script>

<script type="text/javascript">
	(function foo(x){
		console.log(arguments);
		return x;
	})(1,2,3,4,5)
</script>

<script type="text/javascript">
	function foo(){
		bar.apply(null,arguments)//bar(arguments)
	}

	function bar(){
		console.log(arguments)
	}

	foo(1,2,3)
</script>

以下表达式的结果
parseInt(3,8) 3
parseInt(3,2) NaN
parseInt(3,0) NaN

typeof 可能返回的值
Object String Boolean function Number undefined

call和apply作用是什么，什么区别
改变this指向，传参列表不一样

下面alert的结果
<script type="text/tpl">
	function b(x, y, a){//a和[2]是映射的关系，不是同一个，但是同时改变
		arguments[2] = 10;
		alert(a);
	}
	b(1, 2, 3);

	//如果函数体改成下面，结果是什么？
	a = 10;
	alert(arguments[2]);
</script>

逗号操作符
1，2
console.log(1, 2)//返回第二个值
var num = 1 , 2;报错
var num = (1 , 2);

<script type="text/javascript">
	var x = 1;
	if(function f(){}){// ()里面转换成表达式，，f被立即执行，引用找不到
		x += typeof f;// 1undefined
	}
	console.log(x);
</script>

<script type="text/javascript">
	var f = (
		function f(){
			return '1'
		},
		function g(){
			return 2
		})()
		console.log(typeof f)
</script>



以下表达式为true的是
null == undefined	 null === undefined 	isNaN('100')


isNaN方法
<script type="text/javascript">
	function myisNaN(num){
		var ret = Number(num);
		ret += '';
		if(ret == 'NaN'){
			return true
		}else{
			return false;
		}
	}
</script>

引用值比的是地址
<script type="text/javascript">
	console.log({} == {});
	var obj = {};
	var obj1 = obj;
	console.log(obj1 == obj);
	console.log(obj1 === obj)
</script>